/* 
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published
** by the Free Software Foundation; either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
**/

#ifndef __protocol_dcp_h_
#define __protocol_dcp_h_

#include <stdint.h>
/**
 * Constants
 */

#define RECIEVE_JOBS (1<<0)
#define GROUP_ROUTER (1<<1)

#define MSG_DCP_VERSION                   2

#define MAX_DCI_STRING_VALUE          256
#define CLIENT_CHALLENGE_SIZE	      256
#define DCP_HEADER_SIZE               16
#define DCP_ENCRYPTION_HEADER_SIZE    16
#define DCP_EH_UNENCRYPTED_BYTES      8
#define DCP_EH_ENCRYPTED_BYTESS      (DCP_ENCRYPTION_HEADER_SIZE - DCP_EH_UNENCRYPTED_BYTES)
#ifdef __64BIT__
#define PROXY_ENCRYPTION_CTX           ((NXCPEncryptionContext *)_ULL(0xFFFFFFFFFFFFFFFF))
#else
#define PROXY_ENCRYPTION_CTX           ((NXCPEncryptionContext *)0xFFFFFFFF)
#endif

#ifndef EVP_MAX_IV_LENGTH
#define EVP_MAX_IV_LENGTH              16
#endif

#define RECORD_ORDER_NORMAL            0
#define RECORD_ORDER_REVERSED          1

#define DCP_TEMP_BUF_SIZE             65536

/**
 * Ciphers
 */
#define DCP_CIPHER_AES_256      0
#define DCP_CIPHER_BLOWFISH     1
#define DCP_CIPHER_IDEA         2
#define DCP_CIPHER_3DES         3
#define DCP_CIPHER_AES_128      4

#define DCP_SUPPORT_AES_256     0x01
#define DCP_SUPPORT_BLOWFISH    0x02
#define DCP_SUPPORT_IDEA        0x04
#define DCP_SUPPORT_3DES        0x08
#define DCP_SUPPORT_AES_128     0x10

/**
 * Data field structure
 */
#ifdef __HP_aCC
#pragma pack 1
#else
#pragma pack(1)
#endif

typedef struct
{
   uint32_t dwVarId;       // Variable identifier
   uint16_t bType;         // Data type
   uint16_t bPadding;      // Padding
   uint16_t wInt16;
   union
   {
      uint32_t dwInteger;
      uint64_t qwInt64;
      double dFloat;
      struct
      {
         uint32_t dwLen;
         uint16_t szValue[1];
      } string;
   } data; 
} DCP_DF;

#define df_int16  wInt16
#define df_int32  data.dwInteger
#define df_int64  data.qwInt64
#define df_real   data.dFloat
#define df_string data.string

/**
 * Message structure
 */
typedef struct
{
   uint16_t wCode;       // Message (command) code
   uint16_t wFlags;      // Message flags
   uint32_t dwSize;     // Message size (including header) in bytes
   uint32_t dwId;       // Unique message identifier
   uint32_t dwNumVars;  // Number of variables in message
   DCP_DF df[1];    // Data fields
} DCP_MESSAGE;

/**
 * Encrypted payload header
 */
typedef struct
{
   uint32_t dwChecksum;
   uint32_t dwReserved; // Align to 8-byte boundary
} DCP_ENCRYPTED_PAYLOAD_HEADER;

/**
 * Encrypted message structure
 */
typedef struct
{
   uint16_t wCode;       // Should be CMD_ENCRYPTED_MESSAGE
   uint8_t nPadding;    // Number of bytes added to the end of message
   uint8_t nReserved;
   uint32_t dwSize;     // Size of encrypted message (including encryption header and padding)
   uint8_t data[1];     // Encrypted payload
} DCP_ENCRYPTED_MESSAGE;

/**
 * DCI data header structure
 */
typedef struct
{
   uint32_t dwItemId;
   uint32_t dwNumRows;
   uint32_t dwDataType;
} DCI_DATA_HEADER;

/**
 * DCI data row structure
 */
typedef struct
{
   uint32_t dwTimeStamp;
   union
   {
      uint32_t dwInteger;
      uint64_t qwInt64;
      double dFloat;
      uint8_t szString[MAX_DCI_STRING_VALUE];
   } value;
} DCI_DATA_ROW;

/**
 * Data types
 */
#define DCP_DT_INTEGER    0
#define DCP_DT_STRING     1
#define DCP_DT_INT64      2
#define DCP_DT_INT16      3
#define DCP_DT_BINARY     4
#define DCP_DT_FLOAT      5

/**
 * Message flags
 */
#define MF_BINARY          0x0001
#define MF_END_OF_FILE     0x0002
#define MF_DONT_ENCRYPT    0x0004
#define MF_END_OF_SEQUENCE 0x0008
#define MF_REVERSE_ORDER   0x0010
#define MF_CONTROL         0x0020

/**
 * Message (command) codes
 */
#define CMD_LOGIN                      0x0001
#define CMD_LOGIN_RESP                 0x0002
#define CMD_KEEPALIVE                  0x0003
#define CMD_SET_ALARM_HD_STATE         0x0004
#define CMD_GET_OBJECTS                0x0005
#define CMD_OBJECT                     0x0006
#define CMD_DELETE_OBJECT              0x0007
#define CMD_MODIFY_OBJECT              0x0008
#define CMD_OBJECT_LIST_END            0x0009
#define CMD_OBJECT_UPDATE              0x000A
#define CMD_GET_EVENTS                 0x000B
#define CMD_EVENTLOG_RECORDS           0x000C
#define CMD_GET_CONFIG_VARLIST         0x000D
#define CMD_SET_CONFIG_VARIABLE        0x000E
#define CMD_GET_OBJECT_TOOLS           0x000F
#define CMD_EXECUTE_ACTION             0x0010
#define CMD_DELETE_CONFIG_VARIABLE     0x0011
#define CMD_NOTIFY                     0x0012
#define CMD_TRAP                       0x0013
#define CMD_OPEN_EPP                   0x0014
#define CMD_CLOSE_EPP                  0x0015
#define CMD_SAVE_EPP                   0x0016
#define CMD_EPP_RECORD                 0x0017
#define CMD_EVENT_DB_UPDATE            0x0018
#define CMD_TRAP_CFG_UPDATE            0x0019
#define CMD_SET_EVENT_INFO             0x001A
#define CMD_EVENT_DB_RECORD            0x001B
#define CMD_LOAD_EVENT_DB              0x001C
#define CMD_REQUEST_COMPLETED          0x001D
#define CMD_LOAD_USER_DB               0x001E
#define CMD_USER_DATA                  0x001F
#define CMD_GROUP_DATA                 0x0020
#define CMD_USER_DB_EOF                0x0021
#define CMD_UPDATE_USER                0x0022
#define CMD_DELETE_USER                0x0023
#define CMD_CREATE_USER                0x0024
#define CMD_LOCK_USER_DB               0x0025
#define CMD_UNLOCK_USER_DB             0x0026
#define CMD_USER_DB_UPDATE             0x0027
#define CMD_SET_PASSWORD	           0x0028
#define CMD_GET_NODE_DCI_LIST          0x0029
#define CMD_NODE_DCI                   0x002A
#define CMD_GET_LOG_DATA               0x002B
#define CMD_DELETE_NODE_DCI            0x002C
#define CMD_MODIFY_NODE_DCI            0x002D
#define CMD_UNLOCK_NODE_DCI_LIST       0x002E
#define CMD_SET_OBJECT_MGMT_STATUS     0x002F
#define CMD_CREATE_NEW_DCI             0x0030
#define CMD_GET_DCI_DATA               0x0031
#define CMD_DCI_DATA                   0x0032
#define CMD_GET_MIB_TIMESTAMP          0x0033
#define CMD_GET_MIB                    0x0034
#define CMD_TEST_DCI_TRANSFORMATION    0x0035
#define CMD_GET_JOB_LIST               0x0036
#define CMD_CREATE_OBJECT              0x0037
#define CMD_GET_EVENT_NAMES            0x0038
#define CMD_EVENT_NAME_LIST            0x0039
#define CMD_BIND_OBJECT                0x003A
#define CMD_UNBIND_OBJECT              0x003B
#define CMD_UNINSTALL_AGENT_POLICY     0x003C
#define CMD_OPEN_SERVER_LOG            0x003D
#define CMD_CLOSE_SERVER_LOG           0x003E
#define CMD_QUERY_LOG                  0x003F
#define CMD_AUTHENTICATE               0x0040
#define CMD_GET_PARAMETER              0x0041
#define CMD_GET_LIST                   0x0042
#define CMD_ACTION                     0x0043
#define CMD_GET_CURRENT_USER_ATTR      0x0044
#define CMD_SET_CURRENT_USER_ATTR      0x0045
#define CMD_GET_ALL_ALARMS             0x0046
#define CMD_GET_ALARM_NOTES            0x0047
#define CMD_ACK_ALARM                  0x0048
#define CMD_ALARM_UPDATE               0x0049
#define CMD_ALARM_DATA                 0x004A
#define CMD_DELETE_ALARM               0x004B
#define CMD_ADD_CLUSTER_NODE           0x004C
#define CMD_GET_POLICY_INVENTORY       0x004D
#define CMD_LOAD_ACTIONS               0x004E
#define CMD_ACTION_DB_UPDATE           0x004F
#define CMD_MODIFY_ACTION              0x0050
#define CMD_CREATE_ACTION              0x0051
#define CMD_DELETE_ACTION              0x0052
#define CMD_ACTION_DATA                0x0053
#define CMD_GET_CONTAINER_CAT_LIST     0x0054
#define CMD_CONTAINER_CAT_DATA         0x0055
#define CMD_DELETE_CONTAINER_CAT       0x0056
#define CMD_CREATE_CONTAINER_CAT       0x0057
#define CMD_MODIFY_CONTAINER_CAT       0x0058
#define CMD_POLL_NODE                  0x0059
#define CMD_POLLING_INFO               0x005A
#define CMD_COPY_DCI                   0x005B
#define CMD_WAKEUP_NODE                0x005C
#define CMD_DELETE_EVENT_TEMPLATE      0x005D
#define CMD_GENERATE_EVENT_CODE        0x005E
#define CMD_FIND_NODE_CONNECTION       0x005F
#define CMD_FIND_MAC_LOCATION          0x0060
#define CMD_CREATE_TRAP                0x0061
#define CMD_MODIFY_TRAP                0x0062
#define CMD_DELETE_TRAP                0x0063
#define CMD_LOAD_TRAP_CFG              0x0064
#define CMD_TRAP_CFG_RECORD            0x0065
#define CMD_QUERY_PARAMETER            0x0066
#define CMD_GET_SERVER_INFO            0x0067
#define CMD_SET_DCI_STATUS             0x0068
#define CMD_FILE_DATA                  0x0069
#define CMD_TRANSFER_FILE              0x006A
#define CMD_UPGRADE_AGENT              0x006B
#define CMD_GET_PACKAGE_LIST           0x006C
#define CMD_PACKAGE_INFO               0x006D
#define CMD_REMOVE_PACKAGE             0x006E
#define CMD_INSTALL_PACKAGE            0x006F
#define CMD_LOCK_PACKAGE_DB            0x0070
#define CMD_UNLOCK_PACKAGE_DB          0x0071
#define CMD_ABORT_FILE_TRANSFER        0x0072
#define CMD_CHECK_NETWORK_SERVICE      0x0073
#define CMD_GET_AGENT_CONFIG           0x0074
#define CMD_UPDATE_AGENT_CONFIG        0x0075
#define CMD_GET_PARAMETER_LIST         0x0076
#define CMD_DEPLOY_PACKAGE             0x0077
#define CMD_INSTALLER_INFO             0x0078
#define CMD_GET_LAST_VALUES            0x0079
#define CMD_APPLY_TEMPLATE             0x007A
#define CMD_SET_USER_VARIABLE          0x007B
#define CMD_GET_USER_VARIABLE          0x007C
#define CMD_ENUM_USER_VARIABLES        0x007D
#define CMD_DELETE_USER_VARIABLE       0x007E
#define CMD_ADM_MESSAGE                0x007F
#define CMD_ADM_REQUEST                0x0080
#define CMD_GET_NETWORK_PATH           0x0081
#define CMD_REQUEST_SESSION_KEY        0x0082
#define CMD_ENCRYPTED_MESSAGE          0x0083
#define CMD_SESSION_KEY                0x0084
#define CMD_REQUEST_ENCRYPTION         0x0085
#define CMD_GET_ROUTING_TABLE          0x0086
#define CMD_EXEC_TABLE_TOOL            0x0087
#define CMD_TABLE_DATA                 0x0088
#define CMD_CANCEL_JOB                 0x0089
#define CMD_CHANGE_SUBSCRIPTION        0x008A
#define CMD_GET_SYSLOG                 0x008B
#define CMD_SYSLOG_RECORDS             0x008C
#define CMD_JOB_CHANGE_NOTIFICATION    0x008D
#define CMD_DEPLOY_AGENT_POLICY        0x008E
#define CMD_LOG_DATA                   0x008F
#define CMD_GET_OBJECT_TOOL_DETAILS    0x0090
#define CMD_EXECUTE_SERVER_COMMAND     0x0091
#define CMD_UPLOAD_FILE_TO_AGENT       0x0092
#define CMD_UPDATE_OBJECT_TOOL         0x0093
#define CMD_DELETE_OBJECT_TOOL         0x0094
#define CMD_SETUP_PROXY_CONNECTION     0x0095
#define CMD_GENERATE_OBJECT_TOOL_ID    0x0096
#define CMD_GET_SERVER_STATS           0x0097
#define CMD_GET_SCRIPT_LIST            0x0098
#define CMD_GET_SCRIPT                 0x0099
#define CMD_UPDATE_SCRIPT              0x009A
#define CMD_DELETE_SCRIPT              0x009B
#define CMD_RENAME_SCRIPT              0x009C
#define CMD_GET_SESSION_LIST           0x009D
#define CMD_KILL_SESSION               0x009E
#define CMD_GET_TRAP_LOG               0x009F
#define CMD_TRAP_LOG_RECORDS           0x00A0
#define CMD_START_SNMP_WALK            0x00A1
#define CMD_SNMP_WALK_DATA             0x00A2
#define CMD_GET_MAP_LIST               0x00A3
#define CMD_LOAD_MAP                   0x00A4
#define CMD_SAVE_MAP                   0x00A5
#define CMD_DELETE_MAP                 0x00A6
#define CMD_RESOLVE_MAP_NAME           0x00A7
#define CMD_SUBMAP_DATA                0x00A8
#define CMD_UPLOAD_SUBMAP_BK_IMAGE     0x00A9
#define CMD_GET_SUBMAP_BK_IMAGE        0x00AA
#define CMD_GET_MODULE_LIST	           0x00AB
#define CMD_UPDATE_MODULE_INFO	       0x00AC
#define CMD_COPY_USER_VARIABLE         0x00AD
#define CMD_RESOLVE_DCI_NAMES          0x00AE
#define CMD_GET_MY_CONFIG              0x00AF
#define CMD_GET_AGENT_CFG_LIST         0x00B0
#define CMD_OPEN_AGENT_CONFIG          0x00B1
#define CMD_SAVE_AGENT_CONFIG          0x00B2
#define CMD_DELETE_AGENT_CONFIG        0x00B3
#define CMD_SWAP_AGENT_CONFIGS         0x00B4
#define CMD_TERMINATE_ALARM            0x00B5
#define CMD_GET_NXCP_CAPS              0x00B6
#define CMD_NXCP_CAPS                  0x00B7
#define CMD_GET_OBJECT_COMMENTS        0x00B8
#define CMD_UPDATE_OBJECT_COMMENTS     0x00B9
#define CMD_ENABLE_AGENT_TRAPS         0x00BA
#define CMD_PUSH_DCI_DATA              0x00BB
#define CMD_GET_ADDR_LIST              0x00BC
#define CMD_SET_ADDR_LIST              0x00BD
#define CMD_RESET_COMPONENT            0x00BE
#define CMD_GET_DCI_EVENTS_LIST        0x00BF
#define CMD_EXPORT_CONFIGURATION       0x00C0
#define CMD_IMPORT_CONFIGURATION       0x00C1
#define CMD_GET_TRAP_CFG_RO		0x00C2
#define CMD_SNMP_REQUEST		0x00C3
#define CMD_GET_DCI_INFO		0x00C4
#define CMD_GET_GRAPH_LIST		0x00C5
#define CMD_DEFINE_GRAPH		0x00C6
#define CMD_DELETE_GRAPH		0x00C7
#define CMD_GET_PERFTAB_DCI_LIST    0x00C8
#define CMD_ADD_CA_CERTIFICATE		0x00C9
#define CMD_DELETE_CERTIFICATE		0x00CA
#define CMD_GET_CERT_LIST	    	0x00CB
#define CMD_UPDATE_CERT_COMMENTS    0x00CC
#define CMD_QUERY_L2_TOPOLOGY       0x00CD
#define CMD_AUDIT_RECORD            0x00CE
#define CMD_GET_AUDIT_LOG           0x00CF
#define CMD_SEND_SMS                0x00D0
#define CMD_GET_COMMUNITY_LIST      0x00D1
#define CMD_UPDATE_COMMUNITY_LIST   0x00D2
#define CMD_GET_SITUATION_LIST      0x00D3
#define CMD_DELETE_SITUATION        0x00D4
#define CMD_CREATE_SITUATION        0x00D5
#define CMD_DEL_SITUATION_INSTANCE  0x00D6
#define CMD_UPDATE_SITUATION        0x00D7
#define CMD_SITUATION_DATA          0x00D8
#define CMD_SITUATION_CHANGE        0x00D9
#define CMD_CREATE_MAP              0x00DA
#define CMD_UPLOAD_FILE             0x00DB
#define CMD_DELETE_FILE             0x00DC
#define CMD_DELETE_REPORT_RESULTS   0x00DD
#define CMD_RENDER_REPORT           0x00DE
#define CMD_EXECUTE_REPORT          0x00DF
#define CMD_GET_REPORT_RESULTS      0x00E0
#define CMD_CONFIG_SET_CLOB         0x00E1
#define CMD_CONFIG_GET_CLOB         0x00E2
#define CMD_RENAME_MAP              0x00E3
#define CMD_CLEAR_DCI_DATA          0x00E4
#define CMD_GET_LICENSE             0x00E5
#define CMD_CHECK_LICENSE           0x00E6
#define CMD_RELEASE_LICENSE         0x00E7
#define CMD_ISC_CONNECT_TO_SERVICE  0x00E8
#define CMD_REGISTER_AGENT          0x00E9
#define CMD_GET_SERVER_FILE         0x00EA
#define CMD_FORWARD_EVENT           0x00EB
#define CMD_GET_USM_CREDENTIALS     0x00EC
#define CMD_UPDATE_USM_CREDENTIALS  0x00ED
#define CMD_GET_DCI_THRESHOLDS      0x00EE
#define CMD_GET_IMAGE               0x00EF
#define CMD_CREATE_IMAGE            0x00F0
#define CMD_DELETE_IMAGE            0x00F1
#define CMD_MODIFY_IMAGE            0x00F2
#define CMD_LIST_IMAGES             0x00F3
#define CMD_LIST_SERVER_FILES       0x00F4
#define CMD_GET_TABLE               0x00F5
#define CMD_QUERY_TABLE             0x00F6
#define CMD_OPEN_CONSOLE            0x00F7
#define CMD_CLOSE_CONSOLE           0x00F8
#define CMD_GET_SELECTED_OBJECTS    0x00F9
#define CMD_GET_VLANS               0x00FA
#define CMD_HOLD_JOB                0x00FB
#define CMD_UNHOLD_JOB              0x00FC
#define CMD_CHANGE_ZONE             0x00FD
#define CMD_GET_AGENT_FILE          0x00FE
#define CMD_GET_FILE_DETAILS        0x00FF
#define CMD_IMAGE_LIBRARY_UPDATE    0x0100
#define CMD_GET_NODE_COMPONENTS     0x0101
#define CMD_UPDATE_ALARM_NOTE       0x0102
#define CMD_GET_ALARM               0x0103
#define CMD_GET_TABLE_LAST_VALUES   0x0104
#define CMD_GET_TABLE_DCI_DATA      0x0105
#define CMD_GET_THRESHOLD_SUMMARY   0x0106
#define CMD_RESOLVE_ALARM           0x0107
#define CMD_FIND_IP_LOCATION        0x0108
#define CMD_REPORT_DEVICE_STATUS    0x0109
#define CMD_REPORT_DEVICE_INFO      0x010A
#define CMD_GET_ALARM_EVENTS        0x010B
#define CMD_GET_ENUM_LIST           0x010C
#define CMD_GET_TABLE_LIST          0x010D
#define CMD_GET_MAPPING_TABLE       0x010E
#define CMD_UPDATE_MAPPING_TABLE    0x010F
#define CMD_DELETE_MAPPING_TABLE    0x0110
#define CMD_LIST_MAPPING_TABLES     0x0111

// ================== PRIVATE STOCK wCode ===============================
#define CMD_CHK_STOCK		0x0200
#define CMD_STOCK_TO_BUY	0x0201
#define CMD_STOCK_TO_SELL	0x0202
#define CMD_REDELIVER_STR	0x0203
#define CMD_START_ALL		0x0204
#define CMD_STOP_ALL		0x0205
#define CMD_STOCK_LISTS		0x0206
#define CMD_STOCK_EVENT		0x0206

#define CMD_MAX			0x0255

/**
 * Variable identifiers
 */
#define VID_LOGIN_NAME              ((uint32_t)1)
#define VID_PASSWORD                ((uint32_t)2)
#define VID_OBJECT_ID               ((uint32_t)3)
#define VID_OBJECT_NAME             ((uint32_t)4)
#define VID_OBJECT_CLASS            ((uint32_t)5)
#define VID_SNMP_VERSION            ((uint32_t)6)
#define VID_PARENT_CNT              ((uint32_t)7)
#define VID_IP_ADDRESS              ((uint32_t)8)
#define VID_IP_NETMASK              ((uint32_t)9)
#define VID_OBJECT_STATUS           ((uint32_t)10)
#define VID_IF_INDEX                ((uint32_t)11)
#define VID_IF_TYPE                 ((uint32_t)12)
#define VID_FLAGS                   ((uint32_t)13)
#define VID_CREATION_FLAGS          ((uint32_t)14)
#define VID_AGENT_PORT              ((uint32_t)15)
#define VID_AUTH_METHOD             ((uint32_t)16)
#define VID_SHARED_SECRET           ((uint32_t)17)
#define VID_SNMP_AUTH_OBJECT        ((uint32_t)18)
#define VID_SNMP_OID                ((uint32_t)19)
#define VID_NAME                    ((uint32_t)20)
#define VID_VALUE                   ((uint32_t)21)
#define VID_PEER_GATEWAY            ((uint32_t)22)
#define VID_NOTIFICATION_CODE       ((uint32_t)23)
#define VID_EVENT_CODE              ((uint32_t)24)
#define VID_SEVERITY                ((uint32_t)25)
#define VID_MESSAGE                 ((uint32_t)26)
#define VID_DESCRIPTION             ((uint32_t)27)
#define VID_RCC                     ((uint32_t)28)    /* RCC == Request Completion Code */
#define VID_LOCKED_BY               ((uint32_t)29)
#define VID_IS_DELETED              ((uint32_t)30)
#define VID_CHILD_CNT               ((uint32_t)31)
#define VID_ACL_SIZE                ((uint32_t)32)
#define VID_INHERIT_RIGHTS          ((uint32_t)33)
#define VID_USER_NAME               ((uint32_t)34)
#define VID_USER_ID                 ((uint32_t)35)
#define VID_USER_SYS_RIGHTS         ((uint32_t)36)
#define VID_USER_FLAGS              ((uint32_t)37)
#define VID_NUM_MEMBERS             ((uint32_t)38)    /* Number of members in users group */
#define VID_IS_GROUP                ((uint32_t)39)
#define VID_USER_FULL_NAME          ((uint32_t)40)
#define VID_USER_DESCRIPTION        ((uint32_t)41)
#define VID_UPDATE_TYPE             ((uint32_t)42)
#define VID_DCI_ID                  ((uint32_t)43)
#define VID_POLLING_INTERVAL        ((uint32_t)44)
#define VID_RETENTION_TIME          ((uint32_t)45)
#define VID_DCI_SOURCE_TYPE         ((uint32_t)46)
#define VID_DCI_DATA_TYPE           ((uint32_t)47)
#define VID_DCI_STATUS              ((uint32_t)48)
#define VID_MGMT_STATUS             ((uint32_t)49)
#define VID_MAX_ROWS                ((uint32_t)50)
#define VID_TIME_FROM               ((uint32_t)51)
#define VID_TIME_TO                 ((uint32_t)52)
#define VID_DCI_DATA                ((uint32_t)53)
#define VID_NUM_THRESHOLDS          ((uint32_t)54)
#define VID_DCI_NUM_MAPS            ((uint32_t)55)
#define VID_DCI_MAP_IDS             ((uint32_t)56)
#define VID_DCI_MAP_INDEXES         ((uint32_t)57)
#define VID_NUM_MIBS                ((uint32_t)58)
#define VID_MIB_NAME                ((uint32_t)59)
#define VID_MIB_FILE_SIZE           ((uint32_t)60)
#define VID_MIB_FILE                ((uint32_t)61)
#define VID_PROPERTIES              ((uint32_t)62)
#define VID_ALARM_SEVERITY          ((uint32_t)63)
#define VID_ALARM_KEY               ((uint32_t)64)
#define VID_ALARM_TIMEOUT           ((uint32_t)65)
#define VID_ALARM_MESSAGE           ((uint32_t)66)
#define VID_RULE_ID                 ((uint32_t)67)
#define VID_NUM_SOURCES             ((uint32_t)68)
#define VID_NUM_EVENTS              ((uint32_t)69)
#define VID_NUM_ACTIONS             ((uint32_t)70)
#define VID_RULE_SOURCES            ((uint32_t)71)
#define VID_RULE_EVENTS             ((uint32_t)72)
#define VID_RULE_ACTIONS            ((uint32_t)73)
#define VID_NUM_RULES               ((uint32_t)74)
#define VID_CATEGORY                ((uint32_t)75)
#define VID_UPDATED_CHILD_LIST      ((uint32_t)76)
#define VID_EVENT_NAME_TABLE        ((uint32_t)77)
#define VID_PARENT_ID               ((uint32_t)78)
#define VID_CHILD_ID                ((uint32_t)79)
#define VID_SNMP_PORT               ((uint32_t)80)
#define VID_CONFIG_FILE_DATA        ((uint32_t)81)
#define VID_COMMENTS                ((uint32_t)82)
#define VID_POLICY_ID               ((uint32_t)83)
#define VID_SNMP_USM_METHODS        ((uint32_t)84)
#define VID_PARAMETER               ((uint32_t)85)
#define VID_NUM_STRINGS             ((uint32_t)86)
#define VID_ACTION_NAME             ((uint32_t)87)
#define VID_NUM_ARGS                ((uint32_t)88)
#define VID_SNMP_AUTH_PASSWORD	    ((uint32_t)89)
#define VID_CLASS_ID_LIST           ((uint32_t)90)
#define VID_SNMP_PRIV_PASSWORD	    ((uint32_t)91)
#define VID_NOTIFICATION_DATA       ((uint32_t)92)
#define VID_ALARM_ID                ((uint32_t)93)
#define VID_TIMESTAMP               ((uint32_t)94)
#define VID_ACK_BY_USER             ((uint32_t)95)
#define VID_IS_ACK                  ((uint32_t)96)
#define VID_ACTION_ID               ((uint32_t)97)
#define VID_IS_DISABLED             ((uint32_t)98)
#define VID_ACTION_TYPE             ((uint32_t)99)
#define VID_ACTION_DATA             ((uint32_t)100)
#define VID_EMAIL_SUBJECT           ((uint32_t)101)
#define VID_RCPT_ADDR               ((uint32_t)102)
#define VID_CATEGORY_NAME           ((uint32_t)103)
#define VID_CATEGORY_ID             ((uint32_t)104)
#define VID_DCI_DELTA_CALCULATION   ((uint32_t)105)
#define VID_TRANSFORMATION_SCRIPT   ((uint32_t)106)
#define VID_POLL_TYPE               ((uint32_t)107)
#define VID_POLLER_MESSAGE          ((uint32_t)108)
#define VID_SOURCE_OBJECT_ID        ((uint32_t)109)
#define VID_DESTINATION_OBJECT_ID   ((uint32_t)110)
#define VID_NUM_ITEMS               ((uint32_t)111)
#define VID_ITEM_LIST               ((uint32_t)112)
#define VID_MAC_ADDR                ((uint32_t)113)
#define VID_TEMPLATE_VERSION        ((uint32_t)114)
#define VID_NODE_TYPE               ((uint32_t)115)
#define VID_INSTANCE                ((uint32_t)116)
#define VID_TRAP_ID                 ((uint32_t)117)
#define VID_TRAP_OID                ((uint32_t)118)
#define VID_TRAP_OID_LEN            ((uint32_t)119)
#define VID_TRAP_NUM_MAPS           ((uint32_t)120)
#define VID_SERVER_VERSION          ((uint32_t)121)
#define VID_SUPPORTED_ENCRYPTION    ((uint32_t)122)
#define VID_EVENT_ID                ((uint32_t)123)
#define VID_AGENT_VERSION           ((uint32_t)124)
#define VID_FILE_NAME               ((uint32_t)125)
#define VID_PACKAGE_ID              ((uint32_t)126)
#define VID_PACKAGE_VERSION         ((uint32_t)127)
#define VID_PLATFORM_NAME           ((uint32_t)128)
#define VID_PACKAGE_NAME            ((uint32_t)129)
#define VID_SERVICE_TYPE            ((uint32_t)130)
#define VID_IP_PROTO                ((uint32_t)131)
#define VID_IP_PORT                 ((uint32_t)132)
#define VID_SERVICE_REQUEST         ((uint32_t)133)
#define VID_SERVICE_RESPONSE        ((uint32_t)134)
#define VID_POLLER_NODE_ID          ((uint32_t)135)
#define VID_SERVICE_STATUS          ((uint32_t)136)
#define VID_NUM_PARAMETERS          ((uint32_t)137)
#define VID_NUM_OBJECTS             ((uint32_t)138)
#define VID_OBJECT_LIST             ((uint32_t)139)
#define VID_DEPLOYMENT_STATUS       ((uint32_t)140)
#define VID_ERROR_MESSAGE           ((uint32_t)141)
#define VID_SERVER_ID               ((uint32_t)142)
#define VID_SEARCH_PATTERN          ((uint32_t)143)
#define VID_NUM_VARIABLES           ((uint32_t)144)
#define VID_COMMAND                 ((uint32_t)145)
#define VID_PROTOCOL_VERSION        ((uint32_t)146)
#define VID_ZONE_ID                 ((uint32_t)147)
#define VID_ZONING_ENABLED          ((uint32_t)148)
#define VID_ICMP_PROXY              ((uint32_t)149)
#define VID_ADDR_LIST_SIZE          ((uint32_t)150)
#define VID_IP_ADDR_LIST            ((uint32_t)151)
#define VID_REMOVE_DCI              ((uint32_t)152)
#define VID_TEMPLATE_ID             ((uint32_t)153)
#define VID_PUBLIC_KEY              ((uint32_t)154)
#define VID_SESSION_KEY             ((uint32_t)155)
#define VID_CIPHER                  ((uint32_t)156)
#define VID_KEY_LENGTH              ((uint32_t)157)
#define VID_SESSION_IV              ((uint32_t)158)
#define VID_CONFIG_FILE             ((uint32_t)159)
#define VID_STATUS_CALCULATION_ALG  ((uint32_t)160)
#define VID_NUM_LOCAL_NETS          ((uint32_t)161)
#define VID_NUM_REMOTE_NETS         ((uint32_t)162)
#define VID_APPLY_FLAG              ((uint32_t)163)
#define VID_NUM_TOOLS               ((uint32_t)164)
#define VID_TOOL_ID                 ((uint32_t)165)
#define VID_NUM_COLUMNS             ((uint32_t)166)
#define VID_NUM_ROWS                ((uint32_t)167)
#define VID_TABLE_TITLE             ((uint32_t)168)
#define VID_EVENT_NAME              ((uint32_t)169)
#define VID_CLIENT_TYPE             ((uint32_t)170)
#define VID_LOG_NAME                ((uint32_t)171)
#define VID_OPERATION               ((uint32_t)172)
#define VID_MAX_RECORDS             ((uint32_t)173)
#define VID_NUM_RECORDS             ((uint32_t)174)
#define VID_CLIENT_INFO             ((uint32_t)175)
#define VID_OS_INFO                 ((uint32_t)176)
#define VID_LIBNXCL_VERSION         ((uint32_t)177)
#define VID_VERSION                 ((uint32_t)178)
#define VID_NUM_NODES               ((uint32_t)179)
#define VID_LOG_FILE                ((uint32_t)180)
#define VID_HOP_COUNT               ((uint32_t)181)
#define VID_NUM_SCHEDULES           ((uint32_t)182)
#define VID_STATUS_PROPAGATION_ALG  ((uint32_t)183)
#define VID_FIXED_STATUS            ((uint32_t)184)
#define VID_STATUS_SHIFT            ((uint32_t)185)
#define VID_STATUS_TRANSLATION_1    ((uint32_t)186)
#define VID_STATUS_TRANSLATION_2    ((uint32_t)187)
#define VID_STATUS_TRANSLATION_3    ((uint32_t)188)
#define VID_STATUS_TRANSLATION_4    ((uint32_t)189)
#define VID_STATUS_SINGLE_THRESHOLD ((uint32_t)190)
#define VID_STATUS_THRESHOLD_1      ((uint32_t)191)
#define VID_STATUS_THRESHOLD_2      ((uint32_t)192)
#define VID_STATUS_THRESHOLD_3      ((uint32_t)193)
#define VID_STATUS_THRESHOLD_4      ((uint32_t)194)
#define VID_AGENT_PROXY             ((uint32_t)195)
#define VID_TOOL_TYPE               ((uint32_t)196)
#define VID_TOOL_DATA               ((uint32_t)197)
#define VID_ACL                     ((uint32_t)198)
#define VID_TOOL_OID                ((uint32_t)199)
#define VID_SERVER_UPTIME           ((uint32_t)200)
#define VID_NUM_ALARMS              ((uint32_t)201)
#define VID_ALARMS_BY_SEVERITY      ((uint32_t)202)
#define VID_NETXMSD_PROCESS_WKSET   ((uint32_t)203)
#define VID_NETXMSD_PROCESS_VMSIZE  ((uint32_t)204)
#define VID_NUM_SESSIONS            ((uint32_t)205)
#define VID_NUM_SCRIPTS             ((uint32_t)206)
#define VID_SCRIPT_ID               ((uint32_t)207)
#define VID_SCRIPT_CODE             ((uint32_t)208)
#define VID_SESSION_ID              ((uint32_t)209)
#define VID_RECORDS_ORDER           ((uint32_t)210)
#define VID_NUM_SUBMAPS             ((uint32_t)211)
#define VID_SUBMAP_LIST             ((uint32_t)212)
#define VID_SUBMAP_ATTR             ((uint32_t)213)
#define VID_NUM_LINKS               ((uint32_t)214)
#define VID_LINK_LIST               ((uint32_t)215)
#define VID_MAP_ID                  ((uint32_t)216)
#define VID_NUM_MAPS                ((uint32_t)217)
#define VID_NUM_MODULES             ((uint32_t)218)
#define VID_DST_USER_ID             ((uint32_t)219)
#define VID_MOVE_FLAG               ((uint32_t)220)
#define VID_CHANGE_PASSWD_FLAG      ((uint32_t)221)
#define VID_GUID                    ((uint32_t)222)
#define VID_ACTIVATION_EVENT        ((uint32_t)223)
#define VID_DEACTIVATION_EVENT      ((uint32_t)224)
#define VID_SOURCE_OBJECT           ((uint32_t)225)
#define VID_ACTIVE_STATUS           ((uint32_t)226)
#define VID_INACTIVE_STATUS         ((uint32_t)227)
#define VID_SCRIPT                  ((uint32_t)228)
#define VID_NODE_LIST               ((uint32_t)229)
#define VID_DCI_LIST                ((uint32_t)230)
#define VID_CONFIG_ID               ((uint32_t)231)
#define VID_FILTER                  ((uint32_t)232)
#define VID_SEQUENCE_NUMBER         ((uint32_t)233)
#define VID_VERSION_MAJOR           ((uint32_t)234)
#define VID_VERSION_MINOR           ((uint32_t)235)
#define VID_VERSION_RELEASE         ((uint32_t)236)
#define VID_CONFIG_ID_2             ((uint32_t)237)
#define VID_IV_LENGTH               ((uint32_t)238)
#define VID_DBCONN_STATUS           ((uint32_t)239)
#define VID_CREATION_TIME           ((uint32_t)240)
#define VID_LAST_CHANGE_TIME        ((uint32_t)241)
#define VID_TERMINATED_BY_USER      ((uint32_t)242)
#define VID_STATE                   ((uint32_t)243)
#define VID_CURRENT_SEVERITY        ((uint32_t)244)
#define VID_ORIGINAL_SEVERITY       ((uint32_t)245)
#define VID_HELPDESK_STATE          ((uint32_t)246)
#define VID_HELPDESK_REF            ((uint32_t)247)
#define VID_REPEAT_COUNT            ((uint32_t)248)
#define VID_SNMP_RAW_VALUE_TYPE     ((uint32_t)249)
#define VID_CONFIRMATION_TEXT       ((uint32_t)250)
#define VID_FAILED_DCI_INDEX        ((uint32_t)251)
#define VID_ADDR_LIST_TYPE          ((uint32_t)252)
#define VID_COMPONENT_ID            ((uint32_t)253)
#define VID_SYNC_COMMENTS           ((uint32_t)254)
#define VID_EVENT_LIST              ((uint32_t)255)
#define VID_NUM_TRAPS               ((uint32_t)256)
#define VID_TRAP_LIST               ((uint32_t)257)
#define VID_NXMP_CONTENT            ((uint32_t)258)
#define VID_ERROR_TEXT              ((uint32_t)259)
#define VID_COMPONENT               ((uint32_t)260)
#define VID_CONSOLE_UPGRADE_URL		((uint32_t)261)
#define VID_CLUSTER_TYPE				((uint32_t)262)
#define VID_NUM_SYNC_SUBNETS			((uint32_t)263)
#define VID_SYNC_SUBNETS				((uint32_t)264)
#define VID_NUM_RESOURCES				((uint32_t)265)
#define VID_RESOURCE_ID					((uint32_t)266)
#define VID_SNMP_PROXY					((uint32_t)267)
#define VID_PORT							((uint32_t)268)
#define VID_PDU							((uint32_t)269)
#define VID_PDU_SIZE						((uint32_t)270)
#define VID_IS_SYSTEM					((uint32_t)271)
#define VID_GRAPH_CONFIG				((uint32_t)272)
#define VID_NUM_GRAPHS					((uint32_t)273)
#define VID_GRAPH_ID						((uint32_t)274)
#define VID_AUTH_TYPE					((uint32_t)275)
#define VID_CERTIFICATE					((uint32_t)276)
#define VID_SIGNATURE					((uint32_t)277)
#define VID_CHALLENGE					((uint32_t)278)
#define VID_CERT_MAPPING_METHOD		((uint32_t)279)
#define VID_CERT_MAPPING_DATA       ((uint32_t)280)
#define VID_CERTIFICATE_ID				((uint32_t)281)
#define VID_NUM_CERTIFICATES        ((uint32_t)282)
#define VID_ALARM_TIMEOUT_EVENT     ((uint32_t)283)
#define VID_NUM_GROUPS              ((uint32_t)284)
#define VID_QSIZE_CONDITION_POLLER  ((uint32_t)285)
#define VID_QSIZE_CONF_POLLER       ((uint32_t)286)
#define VID_QSIZE_DCI_POLLER        ((uint32_t)287)
#define VID_QSIZE_DBWRITER          ((uint32_t)288)
#define VID_QSIZE_EVENT             ((uint32_t)289)
#define VID_QSIZE_DISCOVERY         ((uint32_t)290)
#define VID_QSIZE_NODE_POLLER       ((uint32_t)291)
#define VID_QSIZE_ROUTE_POLLER      ((uint32_t)292)
#define VID_QSIZE_STATUS_POLLER     ((uint32_t)293)
#define VID_SYNTHETIC_MASK          ((uint32_t)294)
#define VID_SUBSYSTEM               ((uint32_t)295)
#define VID_SUCCESS_AUDIT           ((uint32_t)296)
#define VID_WORKSTATION             ((uint32_t)297)
#define VID_USER_TAG                ((uint32_t)298)
#define VID_REQUIRED_POLLS          ((uint32_t)299)
#define VID_SYS_DESCRIPTION         ((uint32_t)300)
#define VID_SITUATION_ID            ((uint32_t)301)
#define VID_SITUATION_INSTANCE      ((uint32_t)302)
#define VID_SITUATION_NUM_ATTRS     ((uint32_t)303)
#define VID_INSTANCE_COUNT          ((uint32_t)304)
#define VID_SITUATION_COUNT         ((uint32_t)305)
#define VID_NUM_TRUSTED_NODES       ((uint32_t)306)
#define VID_TRUSTED_NODES           ((uint32_t)307)
#define VID_TIMEZONE                ((uint32_t)308)
#define VID_NUM_CUSTOM_ATTRIBUTES   ((uint32_t)309)
#define VID_MAP_DATA                ((uint32_t)310)
#define VID_PRODUCT_ID              ((uint32_t)311)
#define VID_CLIENT_ID               ((uint32_t)312)
#define VID_LICENSE_DATA            ((uint32_t)313)
#define VID_TOKEN                   ((uint32_t)314)
#define VID_SERVICE_ID              ((uint32_t)315)
#define VID_TOKEN_SOFTLIMIT         ((uint32_t)316)
#define VID_TOKEN_HARDLIMIT         ((uint32_t)317)
#define VID_USE_IFXTABLE            ((uint32_t)318)
#define VID_USE_X509_KEY_FORMAT     ((uint32_t)319)
#define VID_STICKY_FLAG             ((uint32_t)320)
#define VID_AUTOBIND_FILTER         ((uint32_t)321)
#define VID_BASE_UNITS              ((uint32_t)322)
#define VID_MULTIPLIER              ((uint32_t)323)
#define VID_CUSTOM_UNITS_NAME       ((uint32_t)324)
#define VID_PERFTAB_SETTINGS        ((uint32_t)325)
#define VID_EXECUTION_STATUS        ((uint32_t)326)
#define VID_EXECUTION_RESULT        ((uint32_t)327)
#define VID_TABLE_NUM_ROWS          ((uint32_t)328)
#define VID_TABLE_NUM_COLS          ((uint32_t)329)
#define VID_JOB_COUNT               ((uint32_t)330)
#define VID_JOB_ID                  ((uint32_t)331)
#define VID_JOB_TYPE                ((uint32_t)332)
#define VID_JOB_STATUS              ((uint32_t)333)
#define VID_JOB_PROGRESS            ((uint32_t)334)
#define VID_FAILURE_MESSAGE         ((uint32_t)335)
#define VID_POLICY_TYPE             ((uint32_t)336)
#define VID_FIELDS                  ((uint32_t)337)
#define VID_LOG_HANDLE              ((uint32_t)338)
#define VID_START_ROW               ((uint32_t)339)
#define VID_TABLE_OFFSET            ((uint32_t)340)
#define VID_NUM_FILTERS             ((uint32_t)341)
#define VID_GEOLOCATION_TYPE        ((uint32_t)342)
#define VID_LATITUDE                ((uint32_t)343)
#define VID_LONGITUDE               ((uint32_t)344)
#define VID_NUM_ORDERING_COLUMNS    ((uint32_t)345)
#define VID_SYSTEM_TAG              ((uint32_t)346)
#define VID_NUM_ENUMS               ((uint32_t)347)
#define VID_NUM_PUSH_PARAMETERS     ((uint32_t)348) 
#define VID_OLD_PASSWORD		((uint32_t)349)
#define VID_MIN_PASSWORD_LENGTH     ((uint32_t)350)
#define VID_LAST_LOGIN              ((uint32_t)351)
#define VID_LAST_PASSWORD_CHANGE    ((uint32_t)352)
#define VID_DISABLED_UNTIL          ((uint32_t)353)
#define VID_AUTH_FAILURES           ((uint32_t)354)
#define VID_RUNTIME_FLAGS           ((uint32_t)355)
#define VID_FILE_SIZE               ((uint32_t)356)
#define VID_MAP_TYPE                ((uint32_t)357)
#define VID_LAYOUT                  ((uint32_t)358)
#define VID_SEED_OBJECT             ((uint32_t)359)
#define VID_BACKGROUND              ((uint32_t)360)
#define VID_NUM_ELEMENTS            ((uint32_t)361)
#define VID_INTERFACE_ID            ((uint32_t)362)
#define VID_LOCAL_INTERFACE_ID      ((uint32_t)363)
#define VID_LOCAL_NODE_ID           ((uint32_t)364)
#define VID_SYS_NAME                ((uint32_t)365)
#define VID_LLDP_NODE_ID            ((uint32_t)366)
#define VID_IF_SLOT                 ((uint32_t)367)
#define VID_IF_PORT                 ((uint32_t)368)
#define VID_IMAGE_DATA              ((uint32_t)369)
#define VID_IMAGE_PROTECTED         ((uint32_t)370)
#define VID_NUM_IMAGES              ((uint32_t)371)
#define VID_IMAGE_MIMETYPE          ((uint32_t)372)
#define VID_PEER_NODE_ID            ((uint32_t)373)
#define VID_PEER_INTERFACE_ID       ((uint32_t)374)
#define VID_VRRP_VERSION            ((uint32_t)375)
#define VID_VRRP_VR_COUNT           ((uint32_t)376)
#define VID_DESTINATION_FILE_NAME   ((uint32_t)377)
#define VID_NUM_TABLES              ((uint32_t)378)
#define VID_IMAGE                   ((uint32_t)379)
#define VID_DRIVER_NAME             ((uint32_t)380)
#define VID_DRIVER_VERSION          ((uint32_t)381)
#define VID_NUM_VLANS               ((uint32_t)382)
#define VID_CREATE_JOB_ON_HOLD      ((uint32_t)383)
#define VID_TILE_SERVER_URL         ((uint32_t)384)
#define VID_BACKGROUND_LATITUDE     ((uint32_t)385)
#define VID_BACKGROUND_LONGITUDE    ((uint32_t)386)
#define VID_BACKGROUND_ZOOM         ((uint32_t)387)
#define VID_BRIDGE_BASE_ADDRESS     ((uint32_t)388)
#define VID_SUBMAP_ID               ((uint32_t)389)
#define VID_REPORT_DEFINITION       ((uint32_t)390)
#define VID_SLMCHECK_TYPE           ((uint32_t)391)
#define VID_REASON                  ((uint32_t)392)
#define VID_NODE_ID                 ((uint32_t)393)
#define VID_UPTIME_DAY              ((uint32_t)394)
#define VID_UPTIME_WEEK             ((uint32_t)395)
#define VID_UPTIME_MONTH            ((uint32_t)396)
#define VID_PRIMARY_NAME            ((uint32_t)397)
#define VID_NUM_RESULTS             ((uint32_t)398)
#define VID_RESULT_ID_LIST          ((uint32_t)399)
#define VID_RENDER_FORMAT           ((uint32_t)400)
#define VID_FILE_OFFSET             ((uint32_t)401)
#define VID_IS_TEMPLATE             ((uint32_t)402)
#define VID_DOT1X_PAE_STATE         ((uint32_t)403)
#define VID_DOT1X_BACKEND_STATE     ((uint32_t)404)
#define VID_IS_COMPLETE             ((uint32_t)405)
#define VID_MODIFY_TIME             ((uint32_t)406)
#define VID_IS_PHYS_PORT            ((uint32_t)407)
#define VID_CREATE_STATUS_DCI       ((uint32_t)408)
#define VID_NUM_COMMENTS            ((uint32_t)409)
#define VID_NOTE_ID                 ((uint32_t)410)
#define VID_DCOBJECT_TYPE           ((uint32_t)411)
#define VID_INSTANCE_COLUMN         ((uint32_t)412)
#define VID_DATA_COLUMN             ((uint32_t)413)
#define VID_ADMIN_STATE             ((uint32_t)414)
#define VID_OPER_STATE              ((uint32_t)415)
#define VID_EXPECTED_STATE          ((uint32_t)416)
#define VID_LINK_COLOR              ((uint32_t)417)
#define VID_EXACT_MATCH             ((uint32_t)418)
#define VID_RESOLVED_BY_USER        ((uint32_t)419)
#define VID_IS_STICKY               ((uint32_t)420)
#define VID_DATE_FORMAT             ((uint32_t)421)
#define VID_TIME_FORMAT             ((uint32_t)422)
#define VID_LINK_ROUTING            ((uint32_t)423)
#define VID_BACKGROUND_COLOR        ((uint32_t)424)
#define VID_FORCE_RELOAD            ((uint32_t)425)
#define VID_DISCOVERY_RADIUS        ((uint32_t)426)
#define VID_BATTERY_LEVEL           ((uint32_t)427)
#define VID_VENDOR                  ((uint32_t)428)
#define VID_MODEL                   ((uint32_t)429)
#define VID_OS_NAME                 ((uint32_t)430)
#define VID_OS_VERSION              ((uint32_t)431)
#define VID_SERIAL_NUMBER           ((uint32_t)432)
#define VID_DEVICE_ID               ((uint32_t)433)
#define VID_MAPPING_TABLE_ID        ((uint32_t)434)
#define VID_INSTD_METHOD            ((uint32_t)435)
#define VID_INSTD_DATA              ((uint32_t)436)
#define VID_INSTD_FILTER            ((uint32_t)437)
#define VID_ACCURACY                ((uint32_t)438)
#define VID_GEOLOCATION_TIMESTAMP   ((uint32_t)439)

// Base variabe for single threshold in message
#define VID_THRESHOLD_BASE          ((uint32_t)0x00800000)

// Map elements list base
#define VID_ELEMENT_LIST_BASE       ((uint32_t)0x10000000)
#define VID_LINK_LIST_BASE          ((uint32_t)0x40000000)

// Variable ranges for object's ACL
#define VID_ACL_USER_BASE           ((uint32_t)0x00001000)
#define VID_ACL_USER_LAST           ((uint32_t)0x00001FFF)
#define VID_ACL_RIGHTS_BASE         ((uint32_t)0x00002000)
#define VID_ACL_RIGHTS_LAST         ((uint32_t)0x00002FFF)

// Variable range for user group members
#define VID_GROUP_MEMBER_BASE       ((uint32_t)0x00004000)
#define VID_GROUP_MEMBER_LAST       ((uint32_t)0x00004FFF)

// Variable range for data collection object attributes
#define VID_DCI_COLUMN_BASE         ((uint32_t)0x30000000)
#define VID_DCI_THRESHOLD_BASE      ((uint32_t)0x20000000)
#define VID_DCI_SCHEDULE_BASE       ((uint32_t)0x10000000)

// Variable range for event argument list
#define VID_EVENT_ARG_BASE          ((uint32_t)0x00008000)
#define VID_EVENT_ARG_LAST          ((uint32_t)0x00008FFF)

// Variable range for trap parameter list
#define VID_TRAP_PLEN_BASE          ((uint32_t)0x00009000)
#define VID_TRAP_PLEN_LAST          ((uint32_t)0x000093FF)
#define VID_TRAP_PNAME_BASE         ((uint32_t)0x00009400)
#define VID_TRAP_PNAME_LAST         ((uint32_t)0x000097FF)
#define VID_TRAP_PDESCR_BASE        ((uint32_t)0x00009800)
#define VID_TRAP_PDESCR_LAST        ((uint32_t)0x00009BFF)
#define VID_TRAP_PFLAGS_BASE        ((uint32_t)0x00009C00)
#define VID_TRAP_PFLAGS_LAST        ((uint32_t)0x00009FFF)

// Object information can contain variable number of parent and child objects' ids.
// Because each variable in message have to have unique identifier,
// we reserver a two range ids for this variables.
#define VID_PARENT_ID_BASE          ((uint32_t)0x00003000)
#define VID_PARENT_ID_LAST          ((uint32_t)0x00003FFF)

// Reservation of 0x7FFFFFFF ids for child object's list
#define VID_CHILD_ID_BASE           ((uint32_t)0x80000000)
#define VID_CHILD_ID_LAST           ((uint32_t)0xFFFFFFFE)

// Base value for custom attributes
#define VID_CUSTOM_ATTRIBUTES_BASE  ((uint32_t)0x70000000)

// Base value for cluster resource list
#define VID_RESOURCE_LIST_BASE      ((uint32_t)0x20000000)

// Base value for agent's enum values
#define VID_ENUM_VALUE_BASE         ((uint32_t)0x10000000)

// Base value for agent's action arguments
#define VID_ACTION_ARG_BASE         ((uint32_t)0x10000000)

// Base value for agent's parameter list
#define VID_PARAM_LIST_BASE         ((uint32_t)0x10000000)
#define VID_ENUM_LIST_BASE          ((uint32_t)0x20000000)
#define VID_PUSHPARAM_LIST_BASE     ((uint32_t)0x30000000)
#define VID_TABLE_LIST_BASE         ((uint32_t)0x40000000)

// Base value for DCI last values
#define VID_DCI_VALUES_BASE         ((uint32_t)0x10000000)

// Base value for variable names
#define VID_VARLIST_BASE            ((uint32_t)0x10000000)

// Base value for network list
#define VID_VPN_NETWORK_BASE        ((uint32_t)0x10000000)

// Base value for network list
#define VID_OBJECT_TOOLS_BASE       ((uint32_t)0x10000000)

// Base values for table data
#define VID_COLUMN_INFO_BASE        ((uint32_t)0x10000000)
#define VID_COLUMN_NAME_BASE        ((uint32_t)0x10000000)
#define VID_COLUMN_FMT_BASE         ((uint32_t)0x20000000)
#define VID_ROW_DATA_BASE           ((uint32_t)0x30000000)

// Base value for event log records
#define VID_EVENTLOG_MSG_BASE       ((uint32_t)0x10000000)

// Base value for syslog records
#define VID_SYSLOG_MSG_BASE         ((uint32_t)0x10000000)

// Base value for trap log records
#define VID_TRAP_LOG_MSG_BASE       ((uint32_t)0x10000000)

// Base value for script list
#define VID_SCRIPT_LIST_BASE        ((uint32_t)0x10000000)

// Base value for session data
#define VID_SESSION_DATA_BASE       ((uint32_t)0x10000000)

// Base value for SNMP walker data
#define VID_SNMP_WALKER_DATA_BASE   ((uint32_t)0x10000000)

// Base value for map list
#define VID_MAP_LIST_BASE           ((uint32_t)0x10000000)

// Base value for module list
#define VID_MODULE_LIST_BASE        ((uint32_t)0x10000000)

// Base value for agent configs list
#define VID_AGENT_CFG_LIST_BASE     ((uint32_t)0x10000000)

// Base and last values for condition's DCI list
#define VID_DCI_LIST_BASE           ((uint32_t)0x40000000)
#define VID_DCI_LIST_LAST           ((uint32_t)0x4FFFFFFF)

// Base value for DCI push data
#define VID_PUSH_DCI_DATA_BASE      ((uint32_t)0x10000000)

// Base value for address list
#define VID_ADDR_LIST_BASE          ((uint32_t)0x10000000)

// Base value for trap configuration records
#define VID_TRAP_INFO_BASE          ((uint32_t)0x10000000)

// Base value for graph list
#define VID_GRAPH_LIST_BASE         ((uint32_t)0x10000000)
#define VID_GRAPH_ACL_BASE				((uint32_t)0x20000000)

// Base value for system DCI list
#define VID_SYSDCI_LIST_BASE			((uint32_t)0x10000000)

// Base value for certificate list
#define VID_CERT_LIST_BASE 			((uint32_t)0x10000000)

// Base value for various string lists
#define VID_STRING_LIST_BASE 			((uint32_t)0x10000000)

// Base values for situation lists
#define VID_SITUATION_ATTR_LIST_BASE ((uint32_t)0x10000000)
#define VID_INSTANCE_LIST_BASE      ((uint32_t)0x20000000)

// Base value for object links list
#define VID_OBJECT_LINKS_BASE			((uint32_t)0x10000000)
#define VID_SUBMAP_LINK_NAMES_BASE  ((uint32_t)0x20000000)

#define VID_TABLE_COLUMN_INFO_BASE  ((uint32_t)0x10000000)
#define VID_TABLE_DATA_BASE         ((uint32_t)0x20000000)

#define VID_JOB_LIST_BASE           ((uint32_t)0x10000000)

#define VID_COLUMN_FILTERS_BASE     ((uint32_t)0x10000000)
#define VID_ORDERING_COLUMNS_BASE   ((uint32_t)0x40000000)

#define VID_USM_CRED_LIST_BASE      ((uint32_t)0x10000000)

#define VID_IMAGE_LIST_BASE         ((uint32_t)0x10000000)

#define VID_VLAN_LIST_BASE          ((uint32_t)0x10000000)

#define VID_NETWORK_PATH_BASE       ((uint32_t)0x40000000)

#define VID_COMPONENT_LIST_BASE     ((uint32_t)0x20000000)


//
// Inline functions
//

#ifdef __cplusplus

inline BOOL IsBinaryMsg(DCP_MESSAGE *pMsg)
{
   return ntohs(pMsg->wFlags) & MF_BINARY;
}

#endif


#endif   /* __protocol_dcp_h_ */
